package com.njwb.pojo;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
@Component
@Data
//@PropertySource("classpath:student.properties")
@ConfigurationProperties(prefix = "student")
public class Student {
//    @Value("${student.name}")
    private String name;
//    @Value("${student.age}")
    private int age;
    private List<String> hobbies;
    private Map<String,String> phones;
}
